<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<installer-gui-script minSpecVersion="1">
    <title>PROXY Pro Master</title>
    <background mime-type="image/png" file="banner.png" scaling="proportional"/>
    <background-darkAqua mime-type="image/png" file="banner.png" scaling="proportional"/>
    <welcome file="welcome.html" mime-type="text/html"/>
    <conclusion file="conclusion.html" mime-type="text/html"/>
    <license file="PrxNetUniversalLicense.rtf" mime-type="text/rtf"/>
    <installation-check script="installCheck();"/>
    <script>
function installCheck() {
    if(!(system.compareVersions(system.version.ProductVersion, '13.0.0') &gt;= 0)) {
        my.result.title = 'Unable to install';
        my.result.message = 'PROXY Pro Master requires Mac OS X 13.0 or later.';
        my.result.type = 'Fatal';
        return false;
    }

    // Prevent downgrade. 
    // We are using services described here: https://developer.apple.com/documentation/installer_js
    //
    var appBundle = system.files.bundleAtPath("~/Applications/PROXY Pro Master.app");
    if (appBundle != null) {
        system.log("Installed bundle:");
        system.log(appBundle);

        var installedVersion = appBundle["CFBundleVersion"];
        var currentVersion = "11.1.5219";

        if (system.compareVersions(currentVersion, installedVersion) == -1) {
            my.result.title = 'Unable to install';
            my.result.message = "A higher version of the PROXY Pro Master is alredy installed. To downgrade, uninstall current version first.";
            my.result.type = 'Fatal';
            return false;
        }
    }

    return true;
}
    </script>
    <pkg-ref id="com.proxynetworks.MacMaster">
        <bundle-version>
            <bundle CFBundleShortVersionString="11.1.5219" CFBundleVersion="11.1.5219" id="com.proxynetworks.MacMaster" path="PROXY Pro Master.app"/>
        </bundle-version>
    </pkg-ref>
    <options customize="never" require-scripts="false" hostArchitectures="x86_64,arm64"/>
    <choices-outline>
        <line choice="default">
            <line choice="com.proxynetworks.MacMaster"/>
        </line>
    </choices-outline>
    <choice id="default"/>
    <choice id="com.proxynetworks.MacMaster" visible="false">
        <pkg-ref id="com.proxynetworks.MacMaster"/>
    </choice>
    <pkg-ref id="com.proxynetworks.MacMaster" version="11.1.5219" onConclusion="none" installKBytes="55403" updateKBytes="0">#PROXYProMasterBundle.pkg</pkg-ref>
    <domains enable_anywhere="false" enable_currentUserHome="true" enable_localSystem="false"/>
</installer-gui-script>